//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#ifndef NATIVE_DOMAIN_COMPILING_COMMON_FIELD_H
#define NATIVE_DOMAIN_COMPILING_COMMON_FIELD_H

#ifndef NATIVE_SYSTEM_BASE_OBJECT_H
#include "System/Base/Object.h"
#endif
#ifndef NATIVE_SYSTEM_BASE_TYPES_H
#include "System/Base/Types.h"
#endif

using namespace Native::System;

namespace Native { namespace Compiling
{
    //****************************************************************************************************************//
    //CField
    //
    //****************************************************************************************************************//
    NATIVE_DECLARE_CONST_OBJECT(CField, C_FIELD);
    class NATIVE_LIBRARY_EXPORT CField :
        public CObject,
        public IEqualTo<CField>
    {
        NATIVE_DECLARE_OBJECT;
        
        NATIVE_DECLARE_PROPERTY(public, public, size_t, Starting, _starting);
        NATIVE_DECLARE_PROPERTY(public, public, size_t, Ending, _ending);
        NATIVE_DECLARE_PROPERTY(public, public, size_t, Sequence, _sequence);

    public:
        CField();
        CField(C_FIELD& that);
        CField(C_FIELD&& that);
        virtual ~CField();
        //{Object
        virtual wstring ToString() const;
        //}
        //{IEqualTo
        virtual bool operator==(C_FIELD& rvalue) const;
        virtual bool operator!=(C_FIELD& rvalue) const;
        //}
        //{CField
        virtual void Clear();
        virtual CString ToCode() const;
        //}
        C_FIELD& operator=(C_FIELD& rvalue);
    };
}}

#endif